package br.ufrj.ppgi.infovis;

import org.mt4j.MTApplication;

import br.ufrj.ppgi.infovis.mtgraph.GraphScene;
import br.ufrj.ppgi.infovis.util.TextureCache;
import br.ufrj.ppgi.infovis.util.XMLConfigImport;
import br.ufrj.ppgi.infovis.util.XMLImport;




/**
 * @author Ewoud van Pareren
 * 
 * A sample application using MT Tree.
 * This adds a random amount of (collapsible) nodes to the tree.
 */
public class StartInfoVis extends MTApplication {
	
	/**
	 * Some serial thing, not sure why Eclipse keeps whining about it...
	 */
	private static final long serialVersionUID = 466267884415016997L;

	public static GraphScene graphScene;
	
	@Override
	public void startUp()  {
		
		TextureCache.initTextureCache(this);
		
		setGraphScene(new GraphScene(this, "Graph Scene"));
		addScene(getGraphScene());
		
		/*
		// Imports style scene xml
		XMLConfigImport configImporter = new XMLConfigImport("src/br/ufrj/ppgi/infovis/data/config.xml");		
		getGraphScene().setConfig(configImporter.Import());
		*/
		
		// Importa os nodes;
		XMLImport importer = new XMLImport(getGraphScene(), "src/br/ufrj/ppgi/infovis/data/dados.xml");
		importer.Import();
		
	}
	
	public static void main(String[] args) {
		initialize();
	}

	public static GraphScene getGraphScene() {
		return graphScene;
	}

	public static void setGraphScene(GraphScene graphScene) {
		StartInfoVis.graphScene = graphScene;
	}
	
}